import Vue from 'vue'
import Vuex from 'vuex'
// 引入左侧菜单子树
import app from './modules/app'
import user from './modules/user'
// 引入语言集
import lang from './modules/lang'
// 引入getters
import getters from './getters'

// 持久化插件
import createPersistedState from 'vuex-persistedstate'

Vue.use(Vuex)

export default new Vuex.Store({
  plugins: [createPersistedState()],
  getters,
  modules: {
    app, user, lang
  }
})
